package leetcode;

/**
 * @author Retain
 * @date 2021/7/31 17:01
 */
public class Status {
    public void foo() { System.out.print("Afoo "); }
    public void f1() {
        System.out.println("aaa");
    }
}

class Beta extends Status {
    @Override
    public void foo() { System.out.print("Bfoo "); }

    public static void main(String[] args) {

        Status a = new Beta();

        Beta b = (Beta)a;
        a.f1();
        a.foo();

        b.foo();
        b.f1();
    }
}
